package kr.pe.johnkim.checkmileage.mobile.rest.dao;

import kr.pe.johnkim.checkmileage.mobile.domain.CheckMileageLog;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

/**
 * Check Mileage 로그 관련 DAO 메소드들을 구현하는 클래스 이다.
 * 
 * @author : johnkim <cale9797@gmail.com / Bettersoft, Inc.>
 * @Date : 12. 7. 23
 */
public class CheckMileageLogDaoImpl extends SqlMapClientDaoSupport implements CheckMileageLogDao {
    
    // SLF4J Logging
    private Logger logger = LoggerFactory.getLogger(CheckMileageLogDaoImpl.class);

    /**
     * 로그를 저장 한다.
     *
     * @param checkMileageLog
     */
    @Override
    public void registerLog(CheckMileageLog checkMileageLog) {
        logger.info("registerLog");

        getSqlMapClientTemplate().insert("CHECKMILEAGE_LOGS.registerLog", checkMileageLog);
    }

    @Override
    public void registerDecodeLog(CheckMileageLog checkMileageLog) {
        logger.info("registerDecodeLog");

        getSqlMapClientTemplate().insert("CHECKMILEAGE_LOGS_DECODE.registerLog", checkMileageLog);
    }
}
